<?php
$award_guid = elgg_extract ( 'entity_guid', $vars, FALSE );
if($award_guid){
	$award = get_entity($award_guid);
	if($award){
		$title = $award->title;
		$description = $award->description;
		$award_hidden = elgg_view('input/hidden', array(
			'name' => "award_guid",
			'value' => $award->guid
		));
		$file = get_entity($award->file_guid);
		if($file){
			$file_hidden = elgg_view('input/hidden', array(
					'name' => "file_guid",
					'value' => $award->file_guid
			));
		}
	}
}

?>

<div>
	<label><?php echo elgg_echo('resume:award:title'); ?></label><br />
	<?php echo elgg_view('input/text', array('name' => 'title', 'value' => $title)); ?>
</div>

<div>
	<label><?php echo elgg_echo('resume:brief'); ?></label><br />
	<?php echo elgg_view('input/longtext', array('name' => 'description', 'value' => $description)); ?>
</div>

<div>
	<label><?php echo elgg_echo('resume:award:file'); ?></label><br />
	<?php echo elgg_view('input/file', array('name' => 'upload')); ?>
</div>

<div>
	<?php 
		echo $file_hidden;
		echo $award_hidden;
	?>

    <?php echo elgg_view('input/submit', array('value' => elgg_echo('save'))); ?>
</div>

